New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
poetryPlugins.poetry-plugin-poeblix: init at 0.10.0 #295651
Conversation
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/3638 |
pkgs/tools/package-management/poetry/plugins/poetry-plugin-poeblix.nix
Outdated
Show resolved
Hide resolved
pkgs/tools/package-management/poetry/plugins/poetry-plugin-poeblix.nix
Outdated
Show resolved
Hide resolved
dfa5675
to
6a6e07d
Compare
6a6e07d
to
6a3ecb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why weren't the poetry maintainers pinged?
}; | ||
|
||
postPatch = '' | ||
sed -i '/poetry =/d' pyproject.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sed -i '/poetry =/d' pyproject.toml |
Add poetry to buildInputs.
poetry-core | ||
]; | ||
|
||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Please run the tests.
|
||
meta = with lib; { | ||
changelog = "https://github.com/spoorn/poeblix/releases/tag/${src.rev}"; | ||
description = "Poetry Plugin that adds various features that extend the poetry command such as building wheel files with locked dependencies, and validations of wheel/docker containers"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too long
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "poetry-plugin-poeblix"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pname = "poetry-plugin-poeblix"; | |
pname = "poeblix"; |
That's what it's called on PyPI.
@@ -30,6 +30,7 @@ let | |||
poetry-audit-plugin = callPackage ./plugins/poetry-audit-plugin.nix { }; | |||
poetry-plugin-export = callPackage ./plugins/poetry-plugin-export.nix { }; | |||
poetry-plugin-up = callPackage ./plugins/poetry-plugin-up.nix { }; | |||
poetry-plugin-poeblix = callPackage ./plugins/poetry-plugin-poeblix.nix { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
poetry-plugin-poeblix = callPackage ./plugins/poetry-plugin-poeblix.nix { }; | |
poeblix = callPackage ./plugins/poeblix.nix { }; |
and even before that it wasn't sorted alphabetically.
@dotlambda Sorry, this was my first PR, I'll keep that in mind in the future. Should I open a new PR for the changes you suggest? |
Yes please. |
I gave this a try since you don't seem to be making progress: diff --git a/pkgs/tools/package-management/poetry/default.nix b/pkgs/tools/package-management/poetry/default.nix
index 415a2c0274d3..01745041f96b 100644
--- a/pkgs/tools/package-management/poetry/default.nix
+++ b/pkgs/tools/package-management/poetry/default.nix
@@ -27,10 +27,10 @@ let
});
plugins = ps: with ps; {
+ poeblix = callPackage ./plugins/poeblix.nix { };
poetry-audit-plugin = callPackage ./plugins/poetry-audit-plugin.nix { };
poetry-plugin-export = callPackage ./plugins/poetry-plugin-export.nix { };
poetry-plugin-up = callPackage ./plugins/poetry-plugin-up.nix { };
- poetry-plugin-poeblix = callPackage ./plugins/poetry-plugin-poeblix.nix { };
};
# selector is a function mapping pythonPackages to a list of plugins
diff --git a/pkgs/tools/package-management/poetry/plugins/poeblix.nix b/pkgs/tools/package-management/poetry/plugins/poeblix.nix
index 6e8cad3ef953..c73ca64d3a40 100644
--- a/pkgs/tools/package-management/poetry/plugins/poeblix.nix
+++ b/pkgs/tools/package-management/poetry/plugins/poeblix.nix
@@ -2,6 +2,9 @@
, buildPythonPackage
, fetchFromGitHub
, poetry-core
+, poetry
+, pytestCheckHook
+, python
}:
buildPythonPackage rec {
@@ -17,19 +20,32 @@ buildPythonPackage rec {
};
postPatch = ''
- sed -i '/poetry =/d' pyproject.toml
+ sed -i "/^addopts/d" pyproject.toml
'';
- nativeBuildInputs = [
+ build-system = [
poetry-core
];
- doCheck = false;
- pythonImportsCheck = ["poeblix"];
+ buildInputs = [
+ poetry
+ ];
+
+ pythonImportsCheck = [ "poeblix" ];
+
+ nativeCheckInputs = [
+ pytestCheckHook
+ ];
+
+ pytestFlagsArray = [
+ "--pspec" "test_walkthrough.py"
+ ];
+
+ #doCheck = with python; isPy37 || isPy39;
meta = with lib; {
changelog = "https://github.com/spoorn/poeblix/releases/tag/${src.rev}";
- description = "Poetry Plugin that adds various features that extend the poetry command such as building wheel files with locked dependencies, and validations of wheel/docker containers";
+ description = "Poetry plugin for building wheel files with locked dependencies and validating wheel/docker containers";
license = licenses.mit;
homepage = "https://github.com/spoorn/poeblix";
maintainers = with maintainers; [ hennk ]; It didn't work so let's revert this change for now. |
The poeblix tests assume that the plugin is installed in poetry, already (see https://github.com/spoorn/poeblix/blob/main/README.md#development , the I don't know how to do this inside the check phase, maybe you have an idea? |
I started a PR at #300432 to incorporate the changes you requested @dotlambda . Checks are still disabled, though, due to the problem mentioned above |
Description of changes
https://github.com/spoorn/poeblix
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 馃憤 reaction to pull requests you find important.